<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
    <h2>-{{item.cloud}} -{{item.cond_txt}} -{{item.wind_dir}}</h2>
   <dong></dong>
  
    <router-view></router-view>
  </div>
</template>

<script>

	//创建组件
	import dong from './dong'
export default {
	//注册组件
	components:{
		dong,
		
	},
  name: 'HelloWorld',
  data () {
    return {
      msg: '测试axios数据请求',
      item:''
    }
  },
  mounted(){
  	//天气数据
  		this.$axios.get('/west/homeController/getWeather')
  		.then(res=>{
  			console.log(res.data)
  			this.item=res.data
  		})
  		.catch(error=>{
  			console.log(error)
  		})
//		this.$axios.get('/wmsc/geneticResults/geneticResultsList?pn=1')
//			.then(res=>{
//				console.log(res.data)
//			})
  		
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
